\pard\tx960\tx1920\tx2880\tx3840\tx4800\tx5760\tx6720\tx7680\tx8640\tx9600\f0\b0\i0\ul0\fs28 text object highlight bug\
\
\fi-360\li360 Q: My application is modifying text while display is disabled in its window. This is causing weird highlighting splotches to appear on my screen. What's going on? \
\
Q: I'm getting weird highlighting splotches on my screen when running my application. The problem doesn't appear to be in my code. What's going on?\
\fi0\li0 \
\fi-360\li360 \
A:
\fc0 There is a bug in the text object such that when you modify the attributes of the selection (e.g. with
\b setSelFontStyle
\b0 :), the Text object tries to highlight (or unhighlight) the modified text, even if the Text's window's display is disabled. The visible result of this is highlighted splotches on whatever view happened to be lockFocus'ed on last. That frequently turns out to be a menu, in which case the splotches are there for the rest of the application's life (unless you happen to do the same thing again and exactly reverse the unwanted highlighting).\
\
You have a few options on how you can work around this bug:\